package com.huawei.crm.util;

import com.huawei.crm.domain.Employee;
import org.apache.shiro.SecurityUtils;

public class UserContext {

    public static final ThreadLocal<Object> threadLocal = new ThreadLocal<>();


    public static ThreadLocal<Object> getValue() {

        threadLocal.set("hello thread");
        return threadLocal;
    }


    public static Employee getCurrentEmp() {

        return (Employee) SecurityUtils.getSubject().getPrincipal();
    }
}
